package com.geekstudy.week6.source;

import org.eclipse.microprofile.config.spi.ConfigSource;

import java.util.Map;

public class MapConfigSource extends MapBasedConfigSource {

    private final Map source;

    public MapConfigSource(String name, int ordinal, Map source) {
        super(name, ordinal);
        this.source = source;
    }

    @Override
    protected void prepareConfigData(Map configData) throws Throwable {
        configData.putAll(source);
    }

}
